package com.qf.controller;

import com.qf.pojo.TbTeacher;
import com.qf.result.R;
import com.qf.service.TeacherService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * created by 赵文韬 on 2022/8/12 21:34
 */
@RestController
@RequestMapping("/teacher")
public class TeacherController {

    @Resource
    private TeacherService teacherService;
    //我们教师输入姓名，我们把姓名和密码查出来
    @PostMapping("/select")
    private R getPassward(@RequestParam String name){
        List<TbTeacher> tbTeachers = teacherService.selectTeacher(name);
        return R.ok().setResult(tbTeachers);
    }
}
